<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>编辑数据</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/Public/Admin/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="/Public/Admin/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="/Public/Admin/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="/Public/Admin/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/Public/Admin/css/skins/skin-blue.min.css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!-- jQuery 2.2.3 -->
    <script src="/Public/Admin/js/jquery-2.2.3.min.js"></script>
    <!-- Bootstrap 3.3.6 -->
    <script src="/Public/Admin/js/bootstrap.min.js"></script>
    <!-- AdminLTE App -->
    <script src="/Public/Admin/js/app.min.js"></script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">

        <!-- Main Header -->
        <header class="main-header">

            <!-- Logo -->
            <a href="<?php echo U('Admin/Index/index');?>" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>印</b>海</span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>印海</b>后台管理</span>
            </a>

            <!-- Header Navbar -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>
                <!-- Navbar Right Menu -->
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">

                        <!-- User Account Menu -->
                        <li class="dropdown user user-menu">
                            <!-- Menu Toggle Button -->
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <!-- The user image in the navbar-->
                                <img src="/Public/Admin/img/user2-160x160.jpg" class="user-image" alt="User Image">
                                <!-- hidden-xs hides the username on small devices so only the image appears. -->
                                <span class="hidden-xs"><?php echo (session('username')); ?></span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- The user image in the menu -->
                                <li class="user-header">
                                    <img src="/Public/Admin/img/user2-160x160.jpg" class="img-circle" alt="User Image">

                                    <p>
                                        欢迎登录
                                        <small>印海查询系统</small>
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="<?php echo U('Admin/user/pw_reset');?>" class="btn btn-default btn-flat">修改</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="<?php echo U('Admin/public/logout');?>" class="btn btn-default btn-flat">注销</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                        <!-- Control Sidebar Toggle Button -->

                    </ul>
                </div>
            </nav>
        </header>

<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <!-- Sidebar user panel (optional) -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="/Public/Admin/img/user2-160x160.jpg" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p><?php echo (session('username')); ?></p>
                <!-- Status -->
                <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
            </div>
        </div>

        <!-- search form (Optional) -->
        <form action="<?php echo U('Data/showList');?>" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="yw2" class="form-control" placeholder="请输入要查询的印文...">
                <span class="input-group-btn">
                    <button type="submit" id="search-btn" class="btn btn-flat">
                        <i class="fa fa-search"></i>
                    </button>
                </span>
            </div>
        </form>
        <!-- /.search form -->
        <!-- Sidebar Menu -->
        <ul class="sidebar-menu">
            <!--
            <li class="header">HEADER</li>
            <li class="active"><a href="#"><i class="fa fa-link"></i> <span>Link</span></a></li>
            -->
            <?php if(session('role_id') == 1): ?><li><a href="<?php echo U('System/index');?>"><i class="fa fa-link"></i> <span>系统设置</span></a></li>
            <li class="<?php echo $Think.CONTROLLER_NAME == 'User' ? 'active ':'';?>treeview">
                <a href="#">
                    <i class="fa fa-link"></i> <span>用户管理</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li<?php echo $Think.ACTION_NAME == 'showList' ? ' class="active"':'';?>><a href="<?php echo U('User/showList');?>">用户列表</a></li>
                    <li<?php echo $Think.ACTION_NAME == 'add' ? ' class="active"':'';?>><a href="<?php echo U('User/add');?>">添加用户</a></li>
                </ul>
            </li><?php endif; ?>
            <li class="<?php echo $Think.CONTROLLER_NAME == 'Category' ? 'active ':'';?>treeview">
                <a href="#">
                    <i class="fa fa-link"></i> <span>类别管理</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li<?php echo $Think.ACTION_NAME == 'showList' ? ' class="active"':'';?>><a href="<?php echo U('Category/showList');?>">类别列表</a></li>
                    <li<?php echo $Think.ACTION_NAME == 'add' ? ' class="active"':'';?>><a href="<?php echo U('Category/add');?>">添加类别</a></li>
                </ul>
            </li>
            <li class="<?php echo $Think.CONTROLLER_NAME == 'Data' ? 'active ':'';?>treeview">
                <a href="#">
                    <i class="fa fa-link"></i> <span>数据管理</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <li<?php echo $Think.ACTION_NAME == 'showList' ? ' class="active"':'';?>><a href="<?php echo U('Data/showList');?>">数据列表</a></li>
                    <li<?php echo $Think.ACTION_NAME == 'add' ? ' class="active"':'';?>><a href="<?php echo U('Data/add');?>">添加数据</a></li>
                    <li<?php echo $Think.ACTION_NAME == 'import' ? ' class="active"':'';?>><a href="<?php echo U('Data/import');?>">数据导入</a></li>
                    <li<?php echo $Think.ACTION_NAME == 'export' ? ' class="active"':'';?>><a href="<?php echo U('Data/export');?>">数据导出</a></li>
                </ul>
            </li>
        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            数据管理
            <small>编辑数据</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 数据管理</a></li>
            <li class="active">编辑数据</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <script src="/Public/Plugin/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
        <link rel="stylesheet" href="/Public/Plugin/bootstrapvalidator/css/bootstrapValidator.min.css">
        <!-- Horizontal Form -->
        <div class="box box-info" style="width:90%;margin: 0 auto;">
            <div class="box-header with-border">
                <h3 class="box-title">数据参数</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal" action="" method="post" enctype="multipart/form-data">
                <div class="box-body">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            印章图片
                            <br/><a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/kid" class="badge bg-green">重新上传</a>
                        </label>
                        <div class="col-sm-10">
                            <img src="<?php echo ($data["kid"]); ?>" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="yw2" class="col-sm-2 control-label">印文</label>
                        <div class="col-sm-10">
                            <input type="hidden" name="id" value="<?php echo ($data["id"]); ?>" />
                            <input type="text" class="form-control" id="yw2" name="yw2" value="<?php echo ($data["yw2"]); ?>" placeholder="印文">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="zhulu" class="col-sm-2 control-label">著録</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="zhulu" name="zhulu" value="<?php echo ($data["zhulu"]); ?>" placeholder="著録">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="store" class="col-sm-2 control-label">藏所</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="store" name="store" value="<?php echo ($data["store"]); ?>" placeholder="藏所">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="shidai" class="col-sm-2 control-label">时代</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="shidai" name="shidai" value="<?php echo ($data["shidai"]); ?>" placeholder="时代">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="xingzhi" class="col-sm-2 control-label">性质</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="xingzhi" name="xingzhi" value="<?php echo ($data["xingzhi"]); ?>" placeholder="性质">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="zhidi" class="col-sm-2 control-label">质地</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="zhidi" name="zhidi" value="<?php echo ($data["zhidi"]); ?>" placeholder="质地">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="niushi" class="col-sm-2 control-label">钮式</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="niushi" name="niushi" value="<?php echo ($data["niushi"]); ?>" placeholder="钮式">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="beizhu" class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-10">
                            <textarea class="form-control" id="beizhu" name="beizhu" rows="3" placeholder="备注 ..."><?php echo ($data["beizhu"]); ?></textarea>
                        </div>
                    </div>
                    <?php if($data["biankuan1"] === null): ?><div class="form-group">
                            <label for="img" class="col-sm-2 control-label">边款一</label>
                            <div class="col-sm-10">
                                <a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan1" class="badge bg-green">上传图片</a>
                            </div>
                        </div>
                        <?php else: ?>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                边款一
                                <br/><a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan1" class="badge bg-green">重新上传</a>
                            </label>
                            <div class="col-sm-10">
                                <img src="<?php echo ($data["biankuan1"]); ?>" />
                            </div>
                        </div><?php endif; ?>
                    <?php if($data["biankuan2"] === null): ?><div class="form-group">
                            <label for="img" class="col-sm-2 control-label">边款二</label>
                            <div class="col-sm-10">
                                <a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan2" class="badge bg-green">上传图片</a>
                            </div>
                        </div>
                        <?php else: ?>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                边款二
                                <br/><a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan2" class="badge bg-green">重新上传</a>
                            </label>
                            <div class="col-sm-10">
                                <img src="<?php echo ($data["biankuan2"]); ?>" />
                            </div>
                        </div><?php endif; ?>
                    <?php if($data["biankuan3"] === null): ?><div class="form-group">
                            <label for="img" class="col-sm-2 control-label">边款三</label>
                            <div class="col-sm-10">
                                <a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan3" class="badge bg-green">上传图片</a>
                            </div>
                        </div>
                        <?php else: ?>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                边款三
                                <br/><a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan3" class="badge bg-green">重新上传</a>
                            </label>
                            <div class="col-sm-10">
                                <img src="<?php echo ($data["biankuan3"]); ?>" />
                            </div>
                        </div><?php endif; ?>
                    <?php if($data["biankuan4"] === null): ?><div class="form-group">
                            <label for="img" class="col-sm-2 control-label">边款四</label>
                            <div class="col-sm-10">
                                <a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan4" class="badge bg-green">上传图片</a>
                            </div>
                        </div>
                        <?php else: ?>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                边款四
                                <br/><a href="/Admin/Data/uploadImg/id/<?php echo ($data["id"]); ?>/field/biankuan4" class="badge bg-green">重新上传</a>
                            </label>
                            <div class="col-sm-10">
                                <img src="<?php echo ($data["biankuan4"]); ?>" />
                            </div>
                        </div><?php endif; ?>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="reset" class="btn btn-default">重置</button>
                    <button type="submit" class="btn btn-info pull-right">提交</button>
                </div>
                <!-- /.box-footer -->
            </form>
        </div>
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script type="text/javascript">
    //jQuery代码
    $(function () {
        $('form').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                yw2: {
                    validators: {
                        notEmpty: {
                            message: '印文不能为空'
                        }
                    }
                }
            }
        });
    });
</script>
<!-- Main Footer -->
<footer class="main-footer">
    <!-- To the right -->
    <div class="pull-right hidden-xs">
        made by iceberg
    </div>
    <!-- Default to the left -->
    <strong>Copyright &copy; 2017 <a href="#">Company</a>.</strong> All rights reserved.
</footer>


</div>
<!-- ./wrapper -->
</body>
</html>